package com.bd.scm.module.enclosure.service.impl;

import com.bd.scm.dao.mapper.enclosure.BdEnclosureMapper;
import com.bd.scm.domain.models.enclosure.BdEnclosure;
import com.bd.scm.module.common.BaseServiceImpl;
import com.bd.scm.module.enclosure.service.BdEnclosureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 附件表 服务实现类
 * </p>
 *
 * @author Mason
 * @since 2020-01-04
 */
@Service
public class BdEnclosureServiceImpl extends BaseServiceImpl<BdEnclosureMapper, BdEnclosure> implements
        BdEnclosureService {

    @Autowired
    private BdEnclosureMapper bdEnclosureMapper;
    /**
     * 插入附件表.
     *
     * @param list
     */
    @Override
    public void saveEnclosure(List<BdEnclosure> list) {
        bdEnclosureMapper.saveEnclosure(list);
    }

    /**
     * 根据单号查询附件
     * @param orderId
     * @return
     */
    @Override
    public List<BdEnclosure> findEnclosureList(String orderId) {
        return this.bdEnclosureMapper.findEnclosureList(orderId);
    }
}
